package com.glsc.ngateway.common.base.domain.mysql.flowable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 流程明细表
 */
@Entity
@Table(name = "t_flowable_tenant")
@Inheritance(strategy = InheritanceType.JOINED)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class FlowableTenant implements Serializable {
    @ApiModelProperty(value = "唯一编号")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "l_id", columnDefinition = "int comment '唯一编号'")
    private Integer id;

    @ApiModelProperty(value = "第三方系统名称")
    @Column(name = "vc_sysid", columnDefinition = "varchar(100) '")
    private String sysid;

    @ApiModelProperty(value = "流程定义key")
    @Column(name = "vc_process_definition_key", columnDefinition = "varchar(100) '")
    private String processDefinitionKey;

    @ApiModelProperty(value = "最新流程定义id")
    @Column(name = "vc_latest_process_definition_id", columnDefinition = "varchar(100) '")
    private String latestProcessDefinitionId;

    @ApiModelProperty(value = "流程定义key")
    @Column(name = "vc_latest_process_definition_md5", columnDefinition = "varchar(36) '")
    private String processDefinitionMd5;

    public String getLatestProcessDefinitionId() {
        return latestProcessDefinitionId;
    }

    public void setLatestProcessDefinitionId(String latestProcessDefinitionId) {
        this.latestProcessDefinitionId = latestProcessDefinitionId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSysid() {
        return sysid;
    }

    public void setSysid(String sysid) {
        this.sysid = sysid;
    }

    public String getProcessDefinitionKey() {
        return processDefinitionKey;
    }

    public void setProcessDefinitionKey(String processDefinitionKey) {
        this.processDefinitionKey = processDefinitionKey;
    }

    public String getProcessDefinitionMd5() {
        return processDefinitionMd5;
    }

    public void setProcessDefinitionMd5(String processDefinitionMd5) {
        this.processDefinitionMd5 = processDefinitionMd5;
    }

    @Override
    public String toString() {
        return "FlowableTenant{" +
                "id=" + id +
                ", sysid='" + sysid + '\'' +
                ", processDefinitionKey='" + processDefinitionKey + '\'' +
                ", latestProcessDefinitionId='" + latestProcessDefinitionId + '\'' +
                ", processDefinitionMd5='" + processDefinitionMd5 + '\'' +
                '}';
    }
}
